﻿// Copyright (c) Inossem. All rights reserved.
// Licensed under the LGPL-3.0 license. See LICENSE file in the project root for full license information.
using DWF.Studio.PlatformApi.Model;
using Refit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DWF.Studio.PlatformApi
{
    public interface IPlatformApi
    {
        [Post("")]
        Task<string> LoginAsync(string username, string password);

        [Multipart]
        [Post("/robotandscript/scripts/create")]
        Task<UploadProcessResult> UploadProcessAsync([AliasAs("uuid")] string procid, [AliasAs("scriptGroup")]string group, [AliasAs("scriptName")]string name, [AliasAs("scriptVersion")]string version, [AliasAs("userName")] string userName, [AliasAs("selectedFile")]IEnumerable<StreamPart> streams, [Header("Authorization")]string authorization);

        [Multipart]
        [Post("/robotandscript/scripts/create/v2")]
        Task<UploadProcessResult> UploadProcessAsyncV2([AliasAs("uuid")] string procid, [AliasAs("scriptGroup")] string group, [AliasAs("scriptName")] string name, [AliasAs("scriptVersion")] string version, [AliasAs("userName")] string userName, [AliasAs("password")] string password, [AliasAs("selectedFile")] IEnumerable<StreamPart> streams, [Header("Authorization")] string authorization);
    }
}
